(function() {
	var tmp = location.protocol.indexOf("file")==-1 ? location.pathname : location.href,
	PATH = tmp.substr(0,tmp.lastIndexOf("\/")+1),
	HOME_URL = window.UEDITOR_HOME_URL || PATH+window.TW_EDITOR.editorUrl,
	URL = PATH+window.TW_EDITOR.jsonUrl;
	window.UEDITOR_CONFIG = {
		UEDITOR_HOME_URL : HOME_URL
		,imageUrl:URL+"up_image"
		,imagePath:PATH
		,wordImageUrl:URL+"up_image"
		,wordImagePath:PATH
		,scrawlUrl:URL+"up_scrawl"
		,scrawlPath:PATH
		,fileUrl:URL+"up_file"
		,filePath:PATH
		,catcherUrl:URL+"get_remote"
		,catcherPath:PATH
		,imageManagerUrl:URL+"get_manager"
		,imageManagerPath:PATH
		,getMovieUrl:URL+"get_movie"

		,toolbars:[
		['fullscreen', 'source', '|', 'undo', 'redo', '|',
		'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch','autotypeset','blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist','selectall', 'cleardoc', '|',
		'rowspacingtop', 'rowspacingbottom','lineheight','|',
		'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
		'directionalityltr', 'directionalityrtl', 'indent', '|',
		'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|','touppercase','tolowercase','|',
		'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright','imagecenter', '|',
		'emotion', 'insertimage', 'scrawl', 'insertvideo','music','attachment', 'map', 'gmap', 'insertframe','highlightcode','webapp',/*'pagebreak',*/'template','background', '|',
		'horizontal', 'date', 'time', 'spechars', 'wordimage', '|',
		'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', '|',
		'print', 'preview', 'searchreplace','help']
		]
		,webAppKey:"vYsK19b8gY8QePUI6esZKbts"
		,maximumWords:16777215
		,pageBreakTag:'_twcms_page_break_tag_'
		,scaleEnabled:true
	};
})();
